/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/KeyExchange/dhCalcSharedSecretRequest.h,v 1.3 2003/11/21 12:39:24 itsme Exp $
 *
 *
 */


#ifndef __DHCALCSHAREDSECRETREQUEST_H__

#include <windows.h>

#include "dhCalcRequest.h"
#include "bignum.h"

/* 
 *  this message is sent to the calc thread, 
 *  after the other side public value is received 
 */
class CalcSharedSecretRequest : public CalcRequest {
public:
    CalcSharedSecretRequest(const Number &my_secret, const Number &other_public, const Number& modulus_prime, const Number& subgroup_prime,
            Number& shared_secret, HANDLE hSuccessEvent, HANDLE hFailEvent)
        : m_my_secret(my_secret), m_other_public(other_public), m_modulus_prime(modulus_prime), m_subgroup_prime(subgroup_prime),
        m_shared_secret(shared_secret), CalcRequest(hSuccessEvent, hFailEvent)
    {
    }

    virtual bool doCalculation();

public:
    const Number& m_my_secret;
    const Number& m_other_public;
    const Number& m_modulus_prime;
    const Number& m_subgroup_prime;

    Number& m_shared_secret;
};



#define __DHCALCSHAREDSECRETREQUEST_H__
#endif
